<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>Media Properties</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta content="noindex, nofollow" name="robots">
		<script src="common/fck_dialog_common.js" type="text/javascript"></script>
		<script type="text/javascript">
		var dialog		= window.parent ;
		var oEditor		= dialog.InnerDialogLoaded() ;
		var FCK			= oEditor.FCK ;
		var FCKLang		= oEditor.FCKLang ;
		var FCKConfig	= oEditor.FCKConfig ;
		var FCKDebug	= oEditor.FCKDebug ;
		var FCKTools	= oEditor.FCKTools ;
		document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
		window.onload = function() {
			// Translate the dialog box texts.
			oEditor.FCKLanguageManager.TranslatePage(document) ;
			dialog.SetAutoSize( true ) ;
			dialog.SetOkButton( true ) ;
		}
		function Ok() {
		  var url = GetE('url').value;
		  if(url.length < 20){alert('Not URL');GetE('url').value='';GetE('url').focus();return false;}
		  var width = GetE('width').value;
		  if(width == ''){GetE('width').focus();return false;}
		  var height = GetE('height').value;
		  if(height == ''){GetE('height').focus();return false;}
		  var autostart = GetE('autostart').checked ? 'true' : 'false';
		  var vtype = 'application/x-mplayer2';
		  var vetc = 'controls="imagewindow,controlpanel,statusbar"';
		  if(url.indexOf('.rm')>0 || url.indexOf('.rmvb')>0 || url.indexOf('.ram')>0) {
			vtype = 'audio/x-pn-realaudio-extend';
		  } else if(url.indexOf('.swf')>0 || url.indexOf('.flv')>0 || url.indexOf('.mp4')>0) {
			if((url.indexOf('.flv')>0 || url.indexOf('.mp4')>0) && url.indexOf('?')==-1) {
				FCK.InsertHtml('<embed src="'+oEditor.FCKConfig.DTPath+'file/flash/vcastr3.swf" wmode="opaque" FlashVars="xml=<vcastr><channel><item><source>'+url+'</source><duration></duration><title></title></item></channel><config><isAutoPlay>'+autostart+'</isAutoPlay><controlPanelBgColor>0x333333</controlPanelBgColor><isShowAbout>false</isShowAbout></config></vcastr>" quality="high" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" extendspage="http://get.adobe.com/flashplayer/"></embed>');
				return true;
			}
			vtype = 'application/x-shockwave-flash';
			vetc = 'quality="high" allowfullscreen="true"';
		  }
		  FCK.InsertHtml('<embed src="'+url+'" width="'+width+'" height="'+height+'" type="'+vtype+'" autostart="'+autostart+'" '+vetc+'></embed>');
		  return true;
		}
		</script>
</head>
<body scroll="no" style="overflow: hidden">
  	<table border="0" width="98%" align="center"> 
    <tr height="30"> 
      <td align="right"><span fcklang="DlgImgURL">URL</span></td>
      <td>
      	<input type="text" id="url" style="width:300px" value="http://"/><br/>
		wma wav rm rmvb ram swf flv mp4...
      </td>
    </tr>
    <tr height="30"> 
      <td align="right"><span fckLang="DlgLnkPopResize">Size</span></td>
      <td>
	  <span fckLang="DlgImgWidth">Width</span> <input type="text" name="width" id="width" size="8" value="480"/> px&nbsp;&nbsp;&nbsp; 
	  <span fckLang="DlgImgHeight">Height</span> <input type="text" name="height" id="height" size="8" value="400"/> px
       </td>
    </tr>
    <tr height="30"> 
      <td align="right"><span fckLang="DlgFlashChkPlay">Auto Play</span></td>
      <td>
      	<input type="radio" name="auto" id="autostart" value="1" checked/> <span fckLang="DlgCellWordWrapYes">Yes</span>
      	<input type="radio" name="auto" value="0"/> <span fckLang="DlgCellWordWrapNo">No</span>
      </td>
    </tr>
  </table>
</body>
</html>